package foodmaterial.dao;

import foodmaterial.dto.*;
import foodmaterial.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderDao {

    int insertMealsTypeTemplate(MealsTypeTemplate mealsTypeTemplate) ;
    int updateMealsTypeTemplate(MealsTypeTemplate mealsTypeTemplate) ;
    int deleteMealsTypeTemplate(Long id) ;
    List<MealsTypeTemplate> selectMealsTypeTemplate(MealsTypeTemplateDto dto) ;

    int insertMealsTypeTemplateDetails(List<MealsTypeTemplateDetails> data) ;
    int deleteMealsTypeTemplateDetails(Long id) ;
    List<MealsTypeTemplateDetails> selectMealsTypeTemplateDetails(Long id) ;

    List<FoodMaterial> selectMealsTypeTemplateDetailsBySupply(MealsTypeTemplateDetailsDto dto) ;
    List<FoodMaterial> selectMealsTypeTemplateDetailsByVipSupply(MealsTypeTemplateDetailsDto dto) ;

    List<FoodMaterial> selectCalculateExceed(List<Long> foodMaterialId);

    int insertCustomerTeam(CustomerTeam customerTeam) ;
    int updateCustomerTeam(CustomerTeam customerTeam) ;
    int deleteCustomerTeam(Long id) ;
    List<CustomerTeam> selectCustomerTeam(CustomerTeam customerTeam) ;

    int insertCustomerTeamDetails(List<CustomerTeamDetails> data) ;
    int deleteCustomerTeamDetailsByDetailId(Long id) ;
    int deleteCustomerTeamDetailsByTeamId(Long id) ;
    List<CustomerTeamDetails> selectCustomerTeamDetails(Map<String,Object> params) ;
    List<MealsType> selectCustomerTeamMealsType(CustomerTeam customerTeam) ;

    int insertOrders(List<Orders> data) ;
    int insertRemoveOrders(Orders orders) ;
    int updateOrders(Orders orders) ;
    int deleteOrders(List<Long> ids) ;
    List<Orders> selectOrders(OrdersDto dto) ;
    List<OrdersCount> selectOrdersCount(String currentDate) ;
    List<Orders> selectRemoveOrders(OrdersDto dto);
    List<Orders> checkOrdersExist(OrdersDto dto) ;

    int insertOrdersDetail(List<OrdersDetail> data) ;
    int insertOrdersRecipe(List<OrdersRecipe> data) ;
    int insertOrdersRecipeDetails(List<OrdersRecipeDetails> data) ;
    int insertRemoveOrdersDetail(Long ordersId) ;
    int insertRemoveOrdersRecipe(Long ordersId) ;
    int insertRemoveOrdersRecipeDetail(Long ordersId) ;
    int deleteOrdersDetail(List<Long> ids) ;
    int deleteOrdersRecipe(Long ordersId) ;
    int deleteOrdersRecipeDetails(Long ordersId) ;
    List<OrdersDetail> selectOrdersDetail(Long ordersId) ;
    List<OrdersRecipe> selectOrdersRecipe(Long ordersId) ;
    List<OrdersDetail> selectRemoveOrdersDetail(Long ordersId) ;
    List<OrdersRecipe> selectRemoveOrdersRecipe(Long ordersId) ;
    List<FoodMaterial> selectFoodMaterialAmount(List<Long> ids) ;

    List<Orders> selectTrackOrders(TrackOrdersDto dto) ;
    int batchUpdateOrdersPrice(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateVipOrdersPrice(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateRecipeOrdersPrice(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateRecipeVipOrdersPrice(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateOrdersMoney(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateVipOrdersMoney(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateRecipeOrdersMoney(BatchModifyOrdersPriceDto dto) ;
    int batchUpdateRecipeVipOrdersMoney(BatchModifyOrdersPriceDto dto) ;

    int batchUpdateOrdersStatus(List<Long> orderIds) ;

    List<Orders> selectOrdersStatus(List<Long> orderIds) ;

    List<Orders> selectPrintOrders(List<Long> ordersIds) ;

    List<Orders> selectRecipePrintOrders(List<Long> ordersIds) ;

    int updateOrdersPrintStatus(List<Orders> orders) ;

    int lockOrders(LockOrderDto params) ;

    List<OrdersDetail> selectSupplySummaryByRouter(SupplySummaryBySupplyDto dto) ;

    List<OrdersRecipe> selectRecipeSupplySummaryByRouter(SupplySummaryBySupplyDto dto) ;

    List<FoodMaterial> selectShowPrintLabel(SupplySummaryBySupplyDto dto) ;

    List<RecipeTemplate> selectRecipeShowPrintLabel(SupplySummaryBySupplyDto dto) ;

    List<OrdersDetail> selectPrintLabel(SupplySummaryBySupplyDto dto) ;

    List<OrdersRecipe> selectRecipePrintLabel(SupplySummaryBySupplyDto dto) ;

    List<OrdersDetail> selectSupplySummaryBySupplier(SupplySummaryBySupplierDto params) ;

    int batchUpdateOrdersDetailDistributionDate(BatchModifyOrdersDistributionDateDto dto);
    List<OrdersDetail> selectBatchOrdersDetailDistributionDate(BatchModifyOrdersDistributionDateDto dto) ;

    List<OrdersDetail> selectOrderDetailsByDistributionDateAndRouter(DistributionDateAndRouterDto dto) ;

    List<Map<String,Object>> selectReminder(ReminderDto reminderDto);

    List<Map<String,Object>> selectExceed(ExceedDto dto) ;
    List<Map<String,Object>> selectRecipeExceed(ExceedDto dto) ;

    List<FoodProduct> foodProduct(FoodProductDto dto) ;
}
